/*
 * @Author: 小悟空56
 * @Date: 2021-04-16 20:16:22
 * @LastEditTime: 2022-04-19 22:10:07
 * @LastEditors: 小悟空56
 * @Description: 描述：分支1
 * @FilePath: \copy.copy.com\public\wx\wx.js
 * 白月光
 */
//微信统计系统开发——小悟空 v1.0.6 🐧：894251491
//页面展示
function showWx(wxData){
	var wx_index = Math.floor(Math.random()*wxData.length);
	stxlwx= wxData[wx_index]['number'];
	// console.log(stxlwx);
	wxname = wxData[wx_index]['name'];
    // wximg = wxData[wx_index]['imgurl'];
		wximg ="http://"+domain+wxData[wx_index]['imgurl'];
		$(".ali_wx").text(stxlwx);
		$(".ali_name").text(wxname);
    $(".ali_ewm").attr('src',wximg);

}
//根据域名分组和微信分组获取微信号
function myajax(uid,gid){
	$.ajax({
		url:"http://"+ domain +"/api/wx/catchOne?uid="+uid+"&gid="+gid,
		type:"get",
		dataType:"json",
		async:false, 
		success:function(msg1){	

			var msg = JSON.parse(Base.decode(msg1));
			console.log(msg);
			if(msg.code == 0){
				// alert(1);
				// console.log(msg.data);
				showWx(msg.data);
			}
		}
	});
}

 myajax(dw_uId,dw_gId);
